#include "snake_eat.h"

extern vector<Snake_cell> snake;

extern char map[15][15];

extern int foodx, foody;

void put_money() {
	int rand_x, rand_y;
	time_t t;

	srand((unsigned)time(&t));

	while (1) {
		rand_x = rand() % MAXX + 1;
		rand_y = rand() % MAXY + 1;

		if (map[rand_x][rand_y] == BLANK_CELL) {
			break;
		}

	}

	foodx = rand_x;
	foody = rand_y;
	map[rand_x][rand_y] = SNAKE_FOOD;

	return;
}